package features.advance.jdk.message;

import java.text.MessageFormat;
import java.text.ParsePosition;
import java.util.Arrays;

/**
 * @author LIN
 * @date 2022-03-13 19:44
 */
public class Demo {

    public static void main(String[] args) {
        MessageFormat mf = new MessageFormat("{2}, {1}, {0}");
        String forParsing = "a,x, y, z";
        Object[] objs = mf.parse(forParsing, new ParsePosition(0));
        // result now equals {new String("z")}
        System.out.println(Arrays.toString(objs));
    }
}
